package com.wolf;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author marin
 * @version 1.0
 * @date 2025/8/21 09:22
 * @desc 验证模糊匹配路径的请求
 */
@Controller
public class AntController {

    /**
     * 测试模糊匹配路径
     * @return
     */
    @RequestMapping("/x?z/ant")
    public String ant(){
        return "success";
    }

    /**
     * 测试占位符路径
     * @return
     */
    @RequestMapping("/ant/{id}/{username}")
    public String test(@PathVariable String id, @PathVariable String username){
        System.out.println("id:"+id+",username:"+username);
        return "success";
    }
}
